from django.db.models import CharField,DateTimeField,IntegerField,DecimalField
from apps.vadmin.op_drf.models import CoreModel


class Depreciations(CoreModel):
    name = CharField(max_length=256,null=False,verbose_name="折旧名称")
    deleted_datetime = DateTimeField(null=True,verbose_name="删除时间")
    months = IntegerField(null=False,verbose_name="月份")
    depreciation_min = DecimalField(max_digits=12,decimal_places=2,null=True,verbose_name="折旧后剩余价值")


    class Meta:
        verbose_name = '折旧'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.name}"